import java.awt.BorderLayout;
import java.awt.Dimension;
import java.awt.FlowLayout;

import javax.swing.BorderFactory;
import javax.swing.JButton;
import javax.swing.JPanel;


@SuppressWarnings("serial")
public class ScaleGUI extends JPanel {
	
	private static JPanel weightPanel, options;
	
	public ScaleGUI() {
		super(new BorderLayout(), true);

		// Titled Border
		weightPanel = new JPanel(new BorderLayout(), true);
		weightPanel.setBorder(BorderFactory.createTitledBorder("Weight"));
		weightPanel.setPreferredSize(new Dimension(120,0));

		// Weight Graph
		weightPanel.add(new ScaleGraph(), BorderLayout.CENTER);
		
		// Weight Options
		options = new JPanel(new FlowLayout(), true);
		options.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
		options.setPreferredSize(new Dimension(120,100));

		// Calibrate Button
		options.add(new JButton("Calibrate"));
		weightPanel.add(options, BorderLayout.SOUTH);

		// Build the window
		this.add(weightPanel, BorderLayout.CENTER);
	}
}
